package org.springblade.modules.repair.utils;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/07/08 11:39
 */
public class StrUtil {

	/**
	 * 判断格式化%s出现的次数
	 *
	 * @param str
	 * @return
	 */
	public static Integer getStrCount(String str) {
		char searchChar = 's';
		int count = 0;
		char[] charArray = str.toCharArray();
		for (char item : charArray) {
			if (item == searchChar) {
				count++;
			}
		}
		return count;
	}

}
